package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 班级成员专业成绩编辑DTO
 *
 * @author: yangyongchuan
 * @create: 2020年09月03日 01:45
 */
@ApiModel("班级成员专业成绩编辑DTO")
@Data
public class ClassUserScoreEditDTO implements BaseDTO {

	private static final long serialVersionUID = -8950972900495406454L;

	/**
	 * 归属组织ID
	 */
	@ApiModelProperty(value = "组织ID")
	@NotNull(message = "组织ID不能为空", groups = {Edit.class})
	private Integer orgId;

	/**
	 * 班级ID
	 */
	@ApiModelProperty(value = "班级ID")
	@NotNull(message = "班级ID不能为空", groups = {Edit.class})
	private Integer classId;


	/**
	 * 用户ID
	 */
	@ApiModelProperty(value = "用户ID")
	@NotNull(message = "用户ID不能为空", groups = {Edit.class})
	private Integer userId;

	/**
	 * 专业成绩列表
	 */
	@NotNull(message = "专业成绩列表不能为空", groups = {Edit.class})
	private List<ScoreSubjectEditDTO> subjectList;

	@Data
	public static class ScoreSubjectEditDTO implements BaseDTO {

		/**
		 * 专业学期课程ID
		 */
		@ApiModelProperty(value = "专业学期课程ID cussId")
		@NotNull(message = "专业学期课程ID不能为空", groups = {Edit.class})
		private Integer cussId;

		/**
		 * 成绩
		 */
		@ApiModelProperty(value = "成绩", example = "0")
		@NotNull(message = "成绩不能为空", groups = {Edit.class})
		private BigDecimal score;
	}

}
